#define _CRT_SECURE_NO_WARNINGS
#include"SList.h"



void Test1()
{
	SLNode* plist = NULL;
	SLTPrint(plist);

	SLTPushBack(&plist, 1);
	SLTPushBack(&plist, 2);
	SLTPushBack(&plist, 3);
	SLTPushBack(&plist, 4);
	SLTPushBack(&plist, 5);
	SLTPrint(plist);

	SLTPushFront(&plist, 6);
	SLTPushFront(&plist, 7);
	SLTPushFront(&plist, 8);
	SLTPrint(plist);

	/*SLTPopBack(&plist);
	SLTPopBack(&plist);
	SLTPopBack(&plist);
	SLTPopBack(&plist);
	SLTPopBack(&plist);
	SLTPopBack(&plist);
	SLTPopBack(&plist);
	SLTPopBack(&plist);*/

	/*SLTPopFront(&plist);
	SLTPopFront(&plist);
	SLTPopFront(&plist);
	SLTPopFront(&plist);
	SLTPopFront(&plist);
	SLTPopFront(&plist);
	SLTPopFront(&plist);
	SLTPopFront(&plist);
	SLTPopFront(&plist);*/

	//SLTPrint(plist);

	SLNode* cur = SLTFind(plist, 5);
	SLTPrint(cur);

	SLTInsert(&plist, cur, 15);
	SLTInsert(&plist, cur, 16);
	SLTInsert(&plist, cur, 17);
	SLTPrint(plist);

	SLNode* cur1 = SLTFind(plist, 15);
	SLTErase(&plist, cur1);
	SLNode* cur2 = SLTFind(plist, 16);
	SLTErase(&plist, cur2);
	SLNode* cur3 = SLTFind(plist, 17);
	SLTErase(&plist, cur3);
	SLTPrint(plist);

	SLNode* cur4 = SLTFind(plist, 5);
	SLTInsertAfter(cur4, 18);
	SLTPrint(plist);

	SLTEraseAfter(cur4);
	SLTPrint(plist);

	SLTDestory(&plist);
	SLTPrint(plist);
}



int main()
{
	Test1();
	return 0;
}